package banking5;

import banking5.Account;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-10-05
 * Time:17:22
 */
public class Customer {
    //a
    private String firstName;
    private String lastName;
    private banking5.Account accounts[]=new Account[5];
    public int getNumOfAccounts;
    //b
    public Customer(String firstName, String lastName) {
        this.firstName = firstName;
        this.lastName = lastName;
    }
    //c
    public String getFirstName() {
        return firstName;
    }
    //c
    public String getLastName() {
        return lastName;
    }
    //d


    public void addAccount(Account account){
            accounts[getNumOfAccounts]=account;
           getNumOfAccounts++;

    }
    public Account getAccount(int num){
        return accounts[num];
    }
    public int getNumOfAccount(){
        return getNumOfAccounts;
    }
}
